package tk.xboot.kafka;

import java.text.SimpleDateFormat;
import java.util.Date;


public class Formatter {
    private static ThreadLocal<SimpleDateFormat> formaterHolder
            = ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));

    public static String format(Date date) {
        return formaterHolder.get().format(date);
    }
}
